package com.swxc.ssm.service.impl;

import com.swxc.ssm.mapper.UsertocouMapper;
import com.swxc.ssm.po.Course;
import com.swxc.ssm.po.Usertocou;
import com.swxc.ssm.service.UserService;
import com.swxc.ssm.service.UsertocouService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by admin on 2017/8/4.
 */

public class UsertocouServicelmpl implements UsertocouService{
    @Autowired
    private UsertocouMapper usertocouMapper;

    @Override
    public int insert(Integer UserId, Integer CourseId) {
       return usertocouMapper.insert(UserId,CourseId);
    }

    @Override
    public int deleteByPrimaryKey(Integer ID) {
        return   usertocouMapper.deleteByPrimaryKey(ID);
    }

    @Override
    public List<Course> selectByUserStatus(Integer UserId, Integer Status) {
        return usertocouMapper.selectByUserStatus(UserId,Status);
    }

    @Override
    public List<Course> selectByUserID(Integer ID) {
        return usertocouMapper.selectByUserID(ID);
    }
}
